home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / musictex / older-versions / musictex.502 / BEAMNGEN.MF < prev    next >
Text File  |  1991-11-07  |  2KB  |  84 lines

  1. % Length has been changed to longueur for BCPL_string
  2. % Nicolas Brouard 25/10/91
  3. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  4. %                                                             %
  5. %                   BALKEN                                    %
  6. %                                                             %
  7. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  8. font_x_height beamht#;
  9.  
  10. def drawbeams (expr st, jj, nn) =
  11.     save i, j, longueur, height;
  12.     numeric i, j, longueur, height;
  13.     longueur:= 60.0/32;
  14.     for i=0 upto 5:
  15.         height := longueur*st ;
  16.         beginchar(jj*6+i, longueur, height, 0);
  17.            clear;
  18.            z2 = (w,h);
  19.            z1 = origin;
  20.            penpos1(beamht,90);
  21.            penpos2(beamht,90);
  22.            for j=0 upto nn-1:
  23.              penstroke (z1e---z2e) shifted (0,beamstep*j);
  24.            endfor;
  25.          endchar;
  26.          longueur :=  2*longueur;
  27.     endfor;
  28. enddef;
  29.  
  30. def drawbeamsneg (expr st, jj, nn) =
  31.     save i, longueur, depth;
  32.     numeric i, longueur, depth;
  33.     longueur:= 60.0/32;
  34.     for i=0 upto 5:
  35.         depth := longueur*st;
  36.         beginchar(64+jj*6+i, longueur, 0, depth);
  37.            clear;
  38.            z2 = (w,d);
  39.            z1 = origin;
  40.            penpos1(beamht,90);
  41.            penpos2(beamht,90);
  42.            for j=0 upto nn-1:
  43.              penstroke (z1e---z2e) shifted (0,beamstep*j);
  44.            endfor;
  45.          endchar;
  46.          longueur :=  2*longueur;
  47.     endfor;
  48. enddef;
  49. numeric beamstep;
  50. numeric ss[];
  51.  
  52. beamstep:=0.75nhh;
  53. ss[0]:=0.05;
  54. ss[1]:=0.10;
  55. ss[2]:=0.15;
  56. ss[3]:=0.20;
  57. ss[4]:=0.25;
  58. ss[5]:=0.30;
  59. ss[6]:=0.35;
  60. ss[7]:=0.4;
  61. ss[8]:=0.45;
  62. ss[9]:=0.50;
  63. ss[10]:=0.55;
  64.  
  65.  
  66. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  67. % Balken mit positiver Steigung %
  68. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  69.  
  70. for j=0 upto 9 :
  71. drawbeams(ss[j],j,beammult);
  72. endfor;
  73.  
  74.  
  75. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  76. % Balken mit negativer Steigung %
  77. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  78.  
  79. for j=0 upto 9 :
  80. drawbeamsneg(-ss[j],j,beammult);
  81. endfor;
  82.  
  83. end;
  84.